package codeforces.contest1275;

import java.util.Scanner;


public class ProblemD {
    private static final double[] prob = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.574136008918618E-4, 0.0039018952062430325, 0.015404884970102362, 0.045444410661801965, 0.11187637686493522, 0.24032153963504077, 0.45497582240077866, 0.7483375959079284, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
    private static final double[] expect = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00179168657429527, 0.01254180602006689, 0.049588093066353936, 0.14753724536333232, 0.37179639582385576, 0.834454447154676, 1.695221725373832, 3.1100681691440877, 4.906509400098712, 6.241394727227275, 7.318774015503051, 8.239836631713063, 9.054110649076325, 9.789232506623812, 10.465476552433074, 11.098548190939495, 11.700071667462971, 12.27838827838828, 12.83956043956044, 13.388278388278389, 13.928571428571429, 14.464285714285714, 15.0};

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int k = scanner.nextInt();
        System.out.println(prob[k] + " " + expect[k]);

    }
}
